<?php
$this->pageTitle=Yii::app()->name . ' - Login';
$this->breadcrumbs=array(
	'Login',
);
?>

<h1>Login</h1>
<p>Acesse utilizando sua conta do Facebook:</p>
<div class="form">
<div id="fbwidget">
<?php if (!Yii::app()->user->isGuest/** || (Yii::app()->session['deny'])**/): ?>
<a href="<?php echo Yii::app()->session['logout']; ?>" class="exit"><div></div>
   <span>Logout</span>
</a>
<?php else: ?>
<fb:login-button scope="email, user_about_me,user_location,user_website,read_stream,status_update,publish_stream,user_work_history,offline_access">
      </fb:login-button>
<?php endif; ?>


</div>
<br/>
<p class="hint">
			Observa&ccedil;&atilde;o: O aplicativo n&atilde;o ter&aacute; acesso ao seu login e/ou senha.
</p>
<br/>
<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'login-form',
	'enableClientValidation'=>true,
	'clientOptions'=>array(
		'validateOnSubmit'=>true,
	),
)); ?>

	<p class="note">Campos com asterisco (<span class="required">*</span>) s&atilde;o obrigat&oacute;rios.</p>

	<div class="row">
		<?php echo $form->labelEx($model,'username'); ?>
		<?php echo $form->textField($model,'username'); ?>
		<?php echo $form->error($model,'username'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'password'); ?>
		<?php echo $form->passwordField($model,'password'); ?>
		<?php echo $form->error($model,'password'); ?>
	</div>

	<div class="row rememberMe">
		<?php echo $form->checkBox($model,'rememberMe'); ?>
		<?php echo $form->label($model,'rememberMe'); ?>
		<?php echo $form->error($model,'rememberMe'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton('Login'); ?>
	</div>

<?php $this->endWidget(); ?>
</div><!-- form -->
